package com.itany.springcloud.springcloudnacosgateway6003.config;

import com.netflix.loadbalancer.*;
import org.springframework.cloud.netflix.ribbon.RibbonClient;
import org.springframework.context.annotation.Bean;

// @RibbonClient(name = "springcloud-nacos-ribbon",configuration = RibbonConfig.class)
public class RibbonConfig {

    @Bean
    public IRule ribbonRule(){
        // return new RoundRobinRule();
        // return new WeightedResponseTimeRule();
        return new RandomRule();
        // return new BestAvailableRule();
    }
}
